extends CharacterBody2D

@export var speed = 400

var user = {}
func get_input():
	var input_direction = Input.get_vector("left", "right", "up", "down")
	velocity = input_direction * speed

func _physics_process(delta):
	if !user.is_empty() and user.name == Global.user_name:
		get_input()
		move_and_slide()
		GlobaWeb.set_post.rpc_id(1,Global.user.name,global_position)
	$Label.text = str(user)
